package com.zw.vo;

import com.zw.entity.BudgetColumnsContent;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class BudgetVo implements Serializable {

    @Schema(description = "主键ID")
    private Long id;
    @Schema(description = "本行的编号编号规则第几个项目-第几个小节-第几个预算项")
    private String rowId;
    @Schema(description = "类型 0普通 1小节")
    private Integer type;
    @Schema(description = "父级ID")
    private Long parentId;
    @Schema(description = "备注")
    private String content;
    @Schema(description = "预算")
    private BigDecimal budget;
    @Schema(description = "可见性")
    private Integer visible;
    @Schema(description = "颜色")
    private String color;
    @Schema(description = "是否固定")
    private Integer fixed;
    @Schema(description = "排序")
    private Integer sort;
    @Schema(description = "这一行的内容")
    private Map<String, BudgetColumnsContent> colNameToContent = new HashMap<>();
    @Schema(description = "是否有子项")//决定是这一行否不可更改，有子项不可更改.
    private String hasChild;//0 -没有子项，1 -有子项.

    @Schema(description = "子项列表")
    private List<BudgetVo> children;
}
